<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div {
            width: 100px;
            height: 100px;
        }
        .box1 {
            position: absolute;
            background-color: aqua;
        }
        .box2 {
            background-color: red;
            float: left;

        }
        .box3 {
            width: 400px;
            height: 400px;
            background-color: red;
            float: left;
            position: relative;
        }
        .box4 {
            position: absolute;
            width: 50px;
            height: 50px;
            background-color: black;
            border-radius: 50%;
        }
    </style>
</head>
<body>
    <div class="box1">1</div>
    <div class="box2">2</div>

    <!-- <div class="box3">
        <div class="box4"></div>
    </div> -->

    <!-- 
        绝对定位元素层级要比浮动元素层级高所以显示绝对定位元素
     -->
</body>
</html>